/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tests;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
import lispinterpreter.*;

/**
 *
 * @author JuanFer
 */
public class BlackBoxTest {

    public BlackBoxTest() {
    }

    @BeforeClass
    public static void setUpClass() throws Exception {
    }

    @AfterClass
    public static void tearDownClass() throws Exception {
    }

    @Before
    public void setUp() {
    }

    @After
    public void tearDown() {
    }


    /**
     * Test of findFirstSimpleSublist method, of class BlackBox.
     */
    @Test
    public void testFindFirstSimpleSublist() throws ParentesisException {
	BlackBox box = new BlackBox();
	
        System.out.println("findFirstSimpleSublist");
        LispList complexList = LispParser.parse("(* 2 (mifuncion 3 x (f h 1)) x 3 (+ 2 2))");
        int[] expResult = {2,3};
        int[] result = box.transformCoordinates(box.findFirstSimpleSublist(complexList));
        assertTrue(result.length==2 && result[0]==2 && result[1]==3);
        // TODO review the generated test code and remove the default call to fail.
    }

}